﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GiMess
{
    public partial class AddForm : Form
    {
        public AddForm()
        {
            InitializeComponent();
        }

        public AddForm(string[] groups)
        {
            InitializeComponent();

            groupsBox.Items.AddRange(groups);
            groupsBox.SelectedIndex = 0;
        }

        private void finishButton_Click(object sender, EventArgs e)
        {
            GiNetClient.Instance.ContactAdd(usernameBox.Text, (string)groupsBox.SelectedItem);
            this.Close();
        }
    }
}
